<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>

	<body>
		<!--<div ng-app="" ng-init="firstName='John';lastName='Doe';quantity=1;cost=5;person={firstName:'John',lastName:'Doe'}">
			<p>姓名： {{ firstName + " " + lastName }}</p>
			<p>姓名： <span ng-bind="firstName + ' ' + lastName"></span></p>
			<p>总价： {{ quantity * cost }}</p>
			<p>姓为 <span ng-bind="person.lastName"></span></p>
		</div>-->

		<br />
		<br />
		<br />
		<!--<div ng-app="" ng-controller="personController">
			名：<input type="text" ng-model="person.firstName">
			<br> 
			姓：<input type="text" ng-model="person.lastName">
			<br>
			朋友：<input class="friend" ng-model="friend.boy">
			<br>
			 姓名： {{person.firstName + " " + person.lastName}}
			 <br />
			 <br />
			 朋友：{{friend.boy+" "+friend.girl}}

		</div>

		<script>
			function personController($scope) {
			    $scope.person = {
			        firstName: "John",
			        lastName: "Doe"
			    };
			    $scope.friend={
			    	boy:"xiaoming",
			    	girl:"honghong"
			    }
			}
		</script>-->
		<br />
		<br />
		<br />
		<br />
		<div ng-app="" ng-controller="customersController">
			<div ng-repeat="y in names | orderBy : 'Country'">
				{{y.Name+",..........."+y.City+",............"+y.Country}}
			</div>
			<ul>
				<li ng-repeat="x in names">
					{{ x.Name + ', ' + x.Country }}
				</li> 
			</ul>
		</div>

		<script>
			function customersController($scope, $http) {
				$http.get("angular.json")
					.success(function(response) {
						$scope.names = response;//给scope增加names属性，属性是调回来的是response
					});
			}
		</script>

		<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script>
	</body>

</html>